package me.leiusual.sharing.di

import dagger.Component
import dagger.android.AndroidInjector
import dagger.android.support.AndroidSupportInjectionModule
import me.leiusual.sharing.SharingApplication
import me.leiusual.sharing.api.ApiModule
import me.leiusual.sharing.ui.ActivityModule
import me.leiusual.sharing.viewmodel.ViewModelModule
import javax.inject.Singleton

/**
 * Create by leiusual on 2018/7/15
 */
@Singleton
@Component(modules = [
  AndroidSupportInjectionModule::class,
  AppModule::class,
  ActivityModule::class,
  ViewModelModule::class,
  ApiModule::class
])
interface AppComponent : AndroidInjector<SharingApplication> {

  @Component.Factory
  abstract class Builder : AndroidInjector.Factory<SharingApplication>
}